﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Exceptions
{
    /// <summary>
    /// 异常帮助类
    /// </summary>
    public static class ExceptionHelper
    {
        /// <summary>
        /// 为空抛出异常
        /// </summary>
        /// <exception cref="ArgumentNullException"></exception>
        /// <param name="val"></param>
        public static void ThrowIfNull(object val)
        {
            if (val == null)
                throw new ArgumentNullException("val");
        }
    }
}
